package net.inxweb.bluemeerkat.common.search;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class SearchListRequest_searchcondition_type<SC extends Serializable, E extends Serializable> {
	private List<E> entitys = Collections.emptyList();
	
	private SC serachCodition; 
	
	private Pagination pagination;

	public SC getSerachCodition() {
		return serachCodition;
	}

	public Pagination getPagination() {
		return pagination;
	}

	public void setPagination(Pagination pagination) {
		this.pagination = pagination;
	}

	public void setSerachCodition(SC serachCodition) {
		this.serachCodition = serachCodition;
	}

	public List<E> getEntitys() {
		return entitys;
	}

	public void setList(List<E> entitys) {
		if(entitys.isEmpty()) {
			entitys = new ArrayList<E>(); 
		}
		this.entitys = entitys; 
	}

	public static class Pagination {
		public long pagePerRow;  
		public long currentPageIndex;	
		public long totalRowCount;
		
		public Pagination(long currentPageIndex) {
			this.currentPageIndex = currentPageIndex;
		}
	}
}
